<template>
	<view class="container">
		<cu-custom bgColor="bg-white-nav" isBack>
		    <block slot="content">提现明细</block>
		</cu-custom>
		<view class="balance-box">
			<balance-card money="999999"></balance-card>
			<view class="tabs">
				<view class="tabs-item" :class="{'active':active == 1}" @click="switchTab(1)">收入明细</view>
				<view class="tabs-item" :class="{'active':active == 2}" @click="switchTab(2)">提现明细</view>
			</view>
		</view>
		<view class="m-t30 p-l30 p-r30">
			<schedule :schedule="schedule" :tabsStatus="active"></schedule>
		</view>
	</view>
</template>

<script>
	import balanceCard from './components/balance-card.vue'
	import schedule from './components/schedule.vue'
	export default {
		components:{
			balanceCard,
			schedule
		},
		data() {
			return {
				active:1,
				schedule:{
					name:'完成任务',
					money:'100',
					time:Date.now(),
				}
			}
		},
		methods:{
			switchTab(status) {
				this.active = status
				if(status == 2) {
					this.schedule = {
						name:'提现到微信',
						money:'100',
						time:Date.now(),
						status:1
					}
				} else {
					this.schedule = {
						name:'完成任务',
						money:'100',
						time:Date.now(),
					}
				}
			}
		}
	}
</script>

<style lang="scss">
	.container {
		padding-bottom: 100rpx;
	}
	.balance-box {
		padding: 30rpx;
		padding-bottom: 0;
		background: #fff;
	}
	// .fuzzy-box {
	// 	width: 630rpx;
	// 	height: 210rpx;
	// 	background: linear-gradient( 90deg, #202E5B 0%, #0E1841 100%);
	// 	border-radius: 16rpx;
	// 	opacity: 0.5;
	// 	filter: blur(11rpx);
	// 	position: absolute;
	// 	top: 80rpx;
	// 	left: 70rpx;
	// }
	.tabs {
		height: 80rpx;
		display: flex;
		align-items: center;
		margin-top: 48rpx;
	}
	.tabs-item {
		flex: 1;
		text-align: center;
		color: #666;
		font-size: 26rpx;
	}
	.active {
		color: #111;
		font-weight: 600;
		position: relative;
		&::after {
			content: '';
			width: 50rpx;
			height: 6rpx;
			background: #3662EC;
			border-radius: 1rpx;
			position: absolute;
			bottom: -23rpx;
			left: 50%;
			transform: translateX(-50%);
		}
	}
</style>